import axios from '@/utils/axios';

export const getTopGoodPage = (params) => {
    return axios.request({
        url: '/top-good/page',
        method: 'get',
        params
    });
};

export const addTopGood = (data) => {
    return axios.request({
        url: '/top-good/',
        method: 'post',
        data
    });
};
export const editTopGood = (data) => {
    return axios.request({
        url: '/top-good/',
        method: 'put',
        data
    });
};
export const getDataById = (id) => {
    return axios.request({
        url: '/top-good/' + id,
        method: 'get'
    });
};

export const deleteTopGood = (id) => {
    return axios.request({
        url: '/top-good/' + id,
        method: 'delete'
    });
};
